Fix ptr calculation when converting from a VA
authorJean-Yves Migeon <jym@NetBSD.org>
Fri, 29 Nov 2013 10:39:23 +0000 (11:39 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 29 Nov 2013 11:07:01 +0000 (11:07 +0000)
commitcb08944a482a5e80a3ff1113f0735761cc4c6cb8
treee89fe26d1f250e4f7e1756b973181524dbaac506
parent5743de0269cfec9ad65ce12dce80745fa7b3b669
Fix ptr calculation when converting from a VA

The ptr calculation shall take the offset into the page into account
when ptr is valid.

Reported regression on NetBSD's port-xen with last known working libxen
being rev 2.9. This corrupts the kernel symbol table when the table is
not loaded on a page boundary.

Issue was tracked down by FastIce and Jeff Rizzo. See also
http://mail-index.netbsd.org/port-xen/2013/10/16/msg008088.html

Signed-off-by: Jean-Yves Migeon <jym@NetBSD.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_dom.h